package makeObject;

import java.io.File;
import java.io.IOException;
import java.util.Set;
import java.util.TreeSet;

import comparableForCustomer.IdComparable;
import filterData.FilterData;
import polo.Customer;

public class MakeObject {
	private FilterData filter;
	private Set<Customer> set;
	
	public Set<Customer> makeObject(String[] str){
		set = new TreeSet<Customer>(new IdComparable());
		Customer[] cs = new Customer[str.length];
		for(int i = 0; i < str.length; i++){
			cs[i] = new Customer();
			String[] buf = str[i].split(" ");
			cs[i].setId(Integer.parseInt(buf[0]));
			cs[i].setName(buf[1]);
			cs[i].setMail(buf[2]);
			cs[i].setSex(buf[3]);
			cs[i].setBirthday(buf[4]);
			
			set.add(cs[i]);
		}
		return set;
	}
}
